from django.db import models
from haystack import indexes
from .models import *

class GoodsInfoIndex(indexes.SearchIndex, indexes.Indexable):
    text=indexes.CharField(document=True,use_template=True)

    def get_model(self):
        return GoodsInfo

    def index_queryset(self, using=None):
        return self.get_model().objects.all()